package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ywb
 * @since 2024-03-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("commodity_categories")
@ApiModel(value="CommodityCategoriesEntity对象", description="")
public class CommodityCategoryEntity implements Serializable {
    @ApiModelProperty(value = "商品分类ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "类名")
    private String name;
    
    @ApiModelProperty(value = "图标")
    private String icon;
    
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "影院ID")
    private Long cinemaId;

    @ApiModelProperty(value = "租户ID")
    private Long tenantId;
    
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createdAt;
    
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updatedAt;
    
    @TableField(select = false)
    @ApiModelProperty(value = "删除时间")
    @TableLogic(value = "null", delval = "now()")
    public LocalDateTime deletedAt;
}
